package com.hzy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Package: com.hzy.controller
 * @ClassName: HelloSpringMVC
 * @Author: 862982795
 * @CreateTime: 2021/07/14 15:10
 * @Description:
 */
@Controller
@RequestMapping(value = "HelloSpringMVC")
public class HelloSpringMVC {
    /**
     * 方法描述
     *
     * @return java.lang.String
     * @Description:
     * @author 862982795
     * @date 2021/07/14 15:36
     * @params *@params []
     */
    @RequestMapping(value = "hello")
    public String hello() throws Exception {
        System.out.println("Hello，Spring MVC");
        return "hello";
    }

    @RequestMapping(value = "hello2")
    public String hello2(Map<String,Object> map, @RequestParam(required = false) String account) throws Exception {
        System.out.println("Hello，Spring MVC");
        map.put("account",account);
        return "show";
    }
}
